<?

$fs_ass_tra_employee_entry = new Fieldset (array (
	db_conn=>$_GLOBAL_DBH,
	relation=>"ass_tra_employee_entry",
	title=>"Asset Employee Entry",
	fieldset=>array (
		array (name=>"id",label=>"ID",type=>"numeric",
				value=>$_REQUEST["_employee_entry_id"],
				input=>"hidden",primary_key=>true),
		array (name=>"employee_id",label=>"Employee ID",type=>"numeric",
				relation=>array(foreign=>"ass_tra_employees",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ass_tra_employees",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"asset_id",label=>"Asset ID",type=>"numeric",
				relation=>array(foreign=>"ass_tra_assets",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ass_tra_assets",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"category_id",label=>"Category ID",type=>"numeric",
				relation=>array(foreign=>"ass_tra_categories",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ass_tra_categories",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"status_id",label=>"Status ID",type=>"numeric",
				relation=>array(foreign=>"ass_tra_status",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ass_tra_status",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"asset_description",label=>"Asset Description",type=>"alphanumeric",
				input=>"text"),
		array (name=>"model",label=>"Contact",type=>"alphanumeric",
				input=>"field"),
		array (name=>"serial",label=>"Serial",type=>"alphanumeric",
				input=>"field"),
		array (name=>"barcode",label=>"Barcode",type=>"alphanumeric",
				input=>"field"),
		array (name=>"date_acquired",label=>"Start Acquired",type=>"any",
				input=>"date",value=>_app_date("date_start")),
		array (name=>"date_sold",label=>"Start Sold",type=>"any",
				input=>"date",value=>_app_date("date_start")),
		array (name=>"purchase_price",label=>"Purchase Price",type=>"decimal",
				input=>"field", optional=>true),
		array (name=>"depreciable_method",label=>"Description Method",type=>"decimal",
				input=>"field", optional=>true),
		array (name=>"depreciable_life",label=>"Description Live",type=>"decimal",
				input=>"field", optional=>true),
		array (name=>"salvage_value",label=>"Salvage Value",type=>"decimal",
				input=>"field", optional=>true),
		array (name=>"current_value",label=>"Current Value",type=>"decimal",
				input=>"field", optional=>true),
		array (name=>"description",label=>"Desription",type=>"alphanumeric",
				input=>"text"),
		array (name=>"comments",label=>"Comments",type=>"alphanumeric",
				input=>"text"),
		array (name=>"next_sched_maint",label=>"Next Scheduled Maintenance",type=>"any",
				input=>"date",value=>_app_date("date_start")),
	),
));

$fs_ass_tra_employee_entry->parse ();

?>
